package com.hopu.petshop.controller.old;//package com.hopu.petshop.controller;
//
//import com.hopu.petshop.service.PetService;
//
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.sql.SQLException;
//
///**
// * 根据id查询宠物servlet
// */
//@WebServlet("/findPet.do")
//public class FindPetServlet extends HttpServlet {
//
//    //用spring创建service对象
//    private PetService petService = SpringConfig.getContext().getBean(PetService.class);
//
//    @Override
//    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        String id = req.getParameter("id");
//        try {
//            req.setAttribute("pet",petService.findPetById(Integer.valueOf(id)));
//            req.getRequestDispatcher("/modifyPet.jsp").forward(req,resp);
//        } catch (SQLException e) {
//            e.printStackTrace();
//        }
//    }
//}
